<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualStudio.HTML>
<meta name=Originator content="Microsoft Visual Studio .NET 7.1">
</head>
<body>
<h2>Core Implementation</h2>
<!-- Begin Common Doc (Swaf.BizObj) -->
		<p>
			Provides business object management support that provides a unified set of 
			business object interfaces that can be implemented in various ways to support 
			different data store mechanisms.</p>
		<h3>Design Patterns</h3>
		<ul>
			<li>
				Factory</li>
		</ul>
		<h3>Design Details</h3>
		<p>
			This package provides the support for applications to define their business 
			objects via XML definitions. Rather then building a unique Java class for each 
			business object needed by an application, a single interface defines access to 
			a business object and all application business object definitions can be 
			exposed via that interface.
		</p>
		<p></p>
		<P class="MsoNormal" style="mso-layout-grid-align: none"><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&lt;</span><span style="FONT-SIZE:8pt;COLOR:maroon;FONT-FAMILY:'Lucida Console'">BusinessObject</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Address"&gt;<br/></span><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'">
				<span style='COLOR:blue'>&nbsp; &lt;</span>
				<span style='COLOR:maroon'>Field</span>
				<span style='COLOR:red'>name</span>
				<span style='COLOR:blue'>="Street1"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>validator</span>
				<span style='COLOR:blue'>="length &amp;lt;=25"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:blue'>/&gt;<br/></span>
			</span><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp;</span>
				<span style='COLOR:blue'>&lt;</span>
				<span style='COLOR:maroon'>Field</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>name</span>
				<span style='COLOR:blue'>="Street2"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>validator</span>
				<span style='COLOR:blue'>="length &amp;lt;=25"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:blue'>/&gt;<br/></span>
			</span><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'">
				<span style='COLOR:blue'>&nbsp; &lt;</span>
				<span style='COLOR:maroon'>Field</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>name</span>
				<span style='COLOR:blue'>="City"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>validator</span>
				<span style='COLOR:blue'>="length &amp;lt;=20"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:blue'>/&gt;<br/></span>
			</span><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp;</span><span style='mso-spacerun:yes'>&nbsp;</span><span style='COLOR:blue'>&lt;</span><span style='COLOR:maroon'>Field</span><span style='COLOR:fuchsia'></span><span style='COLOR:red'>name</span><span style='COLOR:blue'>="State"</span><span style='COLOR:fuchsia'></span><span style='COLOR:red'>validator</span><span style='COLOR:blue'>="length == 2; uppercase-letters"&gt;</span>GA<span style='COLOR:blue'>&lt;/</span><span style='COLOR:maroon'>Field</span><span style='COLOR:blue'>&gt;<br/></span></span><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'">
				<span style='COLOR:blue'>&nbsp; &lt;</span>
				<span style='COLOR:maroon'>Field</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>name</span>
				<span style='COLOR:blue'>="PostalCode"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:red'>validator</span>
				<span style='COLOR:blue'>="zip5+opt4"</span>
				<span style='COLOR:fuchsia'></span>
				<span style='COLOR:blue'>/&gt;<br/></span>
			</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&lt;/</span><span style="FONT-SIZE:8pt;COLOR:maroon;FONT-FAMILY:'Lucida Console'">BusinessObject</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&gt;</span></P>
		<P class="MsoNormal" style="mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Lucida Console'"><o:p></o:p>
			</SPAN></P>
		<p>In the example above, a new business object is being defined called Address 
			that contains five fields. Each field is defined with a unique name as well as 
			an options set of validators that define how to validate data contained within 
			a business object. The name of each field defines how to access the field 
			through the business object.</p>
		<h4>Business object field types</h4>
		<p>
			Each field defined in a business object definition can specify a type for the 
			field. Not specifying a type will default to a string type. There are three 
			types of field types:
		</p>
		<OL>
			<LI>
			Basic java types such as int, string, float, etc. Even arbitrary class types. 
			Each java type that can be used as a field type needs to be defined in the 
			configuration file and can be associated with a nick name. The nick name is 
			what is used in the type attribute of the field element of a business object 
			definition.
			<LI>
			Business Object fields. A field can be another type of business object.
			<LI>
				Lists of business objects. A field can contain a list of a business objects.
			</LI>
		</OL>
		<p>The <tt>type</tt> attribute of the <tt>Field</tt> element of a business object 
			definition is a nick-name used out of the "BizObjFieldTypes" class factory.</p>
		<p>Business objects can extend other business objects. For example:</p>
		<p class="MsoNormal" style='mso-layout-grid-align:none'><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&lt;</span><span style="FONT-SIZE:8pt;COLOR:maroon;FONT-FAMILY:'Lucida Console'">BusinessObject</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Patient"</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">extends</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="User"&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp; </span>&lt;</span><span style="FONT-SIZE:8pt;
COLOR:maroon;
FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:
8pt;COLOR:
fuchsia;FONT-FAMILY:
'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">name</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="DateOfBirth"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Date(MM/dd/yyyy)"&gt;</span><st1:date Year="1900" Day="1" Month="1"><span style="FONT-SIZE:8pt;FONT-FAMILY:'Lucida Console'">01/01/1900</span>
			</st1:date><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&lt;/</span><span style="FONT-SIZE:8pt;COLOR:maroon;FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp; </span>&lt;</span><span style="FONT-SIZE:8pt;
COLOR:maroon;
FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:
8pt;COLOR:
fuchsia;FONT-FAMILY:
'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">name</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Gender"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="String"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">validator</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="length 4
to 6"</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'">
				<span style='mso-spacerun:yes'>&nbsp;</span>
				<span style='mso-spacerun:yes'>&nbsp;</span>
			</span><span style="FONT-SIZE:8pt;
COLOR:blue;
FONT-FAMILY:'Lucida Console'">/&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp; </span>&lt;</span><span style="FONT-SIZE:8pt;
COLOR:maroon;
FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:
8pt;COLOR:
fuchsia;FONT-FAMILY:
'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">name</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Age"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Integer"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">validator</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="integer &amp;gt;=
0"</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">/&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp; </span>&lt;</span><span style="FONT-SIZE:8pt;
COLOR:maroon;
FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:
8pt;COLOR:
fuchsia;FONT-FAMILY:
'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">name</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="SSN"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="String"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">validator</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="length &amp;lt;=
10"</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">/&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'"><span style='mso-spacerun:yes'>&nbsp; </span>&lt;</span><span style="FONT-SIZE:8pt;
COLOR:maroon;
FONT-FAMILY:'Lucida Console'">Field</span><span style="FONT-SIZE:
8pt;COLOR:
fuchsia;FONT-FAMILY:
'Lucida Console'"></span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">name</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="Race"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">type</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="String"
</span><span style="FONT-SIZE:8pt;COLOR:red;FONT-FAMILY:'Lucida Console'">validator</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">="length &amp;lt;=
1"</span><span style="FONT-SIZE:8pt;COLOR:fuchsia;FONT-FAMILY:'Lucida Console'">
				<span style='mso-spacerun:yes'>&nbsp;</span>
			</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">/&gt;<br/></span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&lt;/</span><span style="FONT-SIZE:8pt;COLOR:maroon;FONT-FAMILY:'Lucida Console'">BusinessObject</span><span style="FONT-SIZE:8pt;COLOR:blue;FONT-FAMILY:'Lucida Console'">&gt;<o:p></o:p></span></p>
		<p>In this example a new business object is being defined called Patient that 
			extends the User business object. This means that all of the field definitions 
			from the User object will be a part of the Patient object. The IBusinessObject 
			interface defines two methods that make it easy to see if a business object is 
			a particular type of business object:
			<ol>
				<li>
				bizObj.type()  Returns the type of business object. In this case Patient is 
				returned.
				<li>
					bizObj.isKindOf(User)  Returns true or false if the business object extends 
					from the given type specified. In this case true would be returned as Patient 
					does extend User. This works up the inheritance chain, so there is no limit on 
					how deep the inheritance can go and the isKindOf will pick up on any of the 
					types in the chain.</li>
			</ol>
		<p></p>
		Only one type can be specified for the extends attribute of BusinessObject.
		<P></P>
	<!-- End Common Doc -->
</body>
</html>
